extends Talent

func init():
	name = "百战之师"
func _connect():
	sys.main.connect("onBattleStart",self,"run")

func run():
	for i in sys.main.btChas:
		if i.team == 1:
			i.addBuff(Bf.new(lv))

func get_info():
	var num = 1
	if lv == 5:num = 2
	return "击杀敌方单位获得%d点经验"%num

class Bf extends "../../azurlane_ctrl/AzurBuff.gd":
	var tlv = 1
	func _init(tlv):
		attInit()
		dispel = 2
		self.tlv = tlv
		id = "expGain"
	func _connect():
		masCha.connect("onKillChara",self,"run")
	func run(atkInfo):
		var num = 1
		if tlv == 5:num = 2
		sys.main.player.plusEmp(num)